package cn.tangsihai.controller;

import cn.tangsihai.domain.User;
import cn.tangsihai.feign.client.StoreClient;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RestController;

/**
 * 支付接口
 */
@RestController
public class PayController {
    @Autowired
    private StoreClient storeClient;

    @GetMapping("/getById/{id}")
    public User getUser(@PathVariable("id") Long id){
        return storeClient.getId(id); // 解决订单拼写url复杂的问题
    }
}
